package _09define._01introduction;

public class Demo {
    public static void main(String[] args) {
        Student student = new Student("zs", 20, 88);
        //System.out.println(student.age);
        System.out.println(student.name);
        //System.out.println(student.score);
        //访问需求
    }

}
class Student{
    String name;
    private int age;
    private int score;

    public Student(String name, int age, int score) {
        this.name = name;
        this.age = age;
        this.score = score;
    }
    public void setAge(int age){
        if (age>0||age<150){
            this.age=age;
        }
    }
    public int getScore(){
        //权限判

        return score;
    }
}
